<template>
	<view class="page">
		<rich-text :nodes="content"></rich-text>
	</view>
</template>

<script>
	import {notificationsInfo} from "@/api/more.js"
	export default {
		data() {
			return {
				queryData:{
					objectId:"",
					timeZone:8
				},
				content:""
			};
		},
		onLoad(option) {
			this.queryData.timeZone = this.UTILS.getTimeZone();
			this.queryData.objectId = decodeURIComponent(option.objectId);
			this.getDetail()
		},

		methods: {
			getDetail(){
				notificationsInfo(this.queryData).then(res => {
					if(res.code == 0){
						this.content = res?.data?.content || ""
					}
					else{
						this.UTILS.logStr(res.msg || "Failed to retrieve data")
					}
				})
			}
		},
	};
</script>

<style scoped lang="scss">
	.page {
		background-color: #ffffff;
		width: 100%;
		overflow-y: auto;
		overflow-x: hidden;
		height: 100%;
		padding: 32rpx;
	}
</style>